﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace EcoSystem
{
    /// <summary>
    /// 报表配置接口
    /// </summary>
    public interface IHttpApiConfigAppService : ICrudAppService<
        HttpApiConfigDto,
        Guid,
        GetHttpApiConfigInput,
        CreateOrUpdateHttpApiConfigDto,
        CreateOrUpdateHttpApiConfigDto>
    {
        /// <summary>
        /// 不分页查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultDto<HttpApiConfigDto>> GetAllAsync(GetHttpApiConfigInput input);

        /// <summary>
        /// 获取用户拥有权限的配置列表
        /// </summary>
        /// <param name="onlyEnabled"></param>
        /// <returns></returns>
        Task<ListResultDto<HttpApiConfigDto>> GetOwnsListAsync(bool onlyEnabled = true);

        /// <summary>
        /// 按编码获取配置
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<HttpApiConfigDto> GetForCodeAsync(string code);

        /// <summary>
        /// 查询通用接口数据
        /// </summary>
        /// <param name="code">报表编码</param>
        /// <param name="input">请求参数</param>
        /// <returns></returns>
        Task<object> QueryDataAsync(string code, DictionaryRequestInputDto input);

        /// <summary>
        /// 导出Excel
        /// </summary>
        /// <param name="code"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<object> ExportDataAsync(string code, ExportExcelInputDto input);
    }
}
